PrinterInterface

Superclass:
NSObject
Declared In:

Introduction

The base class of the printer interface



Methods

-Close
-getMacAddress
-Open
-Read
-Write:
-WriteAsync:

Close


-(void) Close; 
Discussion

Disconnect


getMacAddress


-(NSString *)getMacAddress; 
Discussion

To get the address from the bluetooth broadcast, the wifi gets the IP address.


Open


-(void) Open; 
Discussion

Connect the printer


Read


-(void)Read; 
Discussion

Read data from the printer (useless)


Write:


-(BOOL) Write:(NSData *)data; 
Discussion

Send data to the printer


WriteAsync:


-(void) WriteAsync:(NSData *)data; 
Discussion

Send data to printer, execute asynchronously


Properties

Address
blewritetype
IsOpen
Name
Port
printerCmdtype
Timeout

Address


@property (nonatomic,
    copy) NSString * Address; 
Discussion

Connection address


blewritetype


@property (nonatomic) BleWriteType blewritetype; 
Discussion

Bluetooth write mode


IsOpen


@property (nonatomic,
    readonly) BOOL IsOpen; 
Discussion

Whether the printer has been connected to the printer


Name


@property (nonatomic,
    copy) NSString * Name; 
Discussion

The device logical name is used for Bluetooth name


Port


@property (nonatomic) NSInteger Port; 
Discussion

Connection port (only for wifiInterface use)


printerCmdtype


@property (nonatomic) PrinterCmdType printerCmdtype; 
Discussion

Instruction type, sdk internal useless, in order to use the external multi-connection


Timeout


@property (nonatomic) NSTimeInterval Timeout; 
Discussion

Connection timeout, unit: second (wifiInterface only)